<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2020/11/16
 * Time: 17:03
 */

namespace app\api\controller;


use app\api\service\RuleService;
use app\common\exception\CustomException;

class RuleController extends BaseController
{
    public function send()
    {
        $hostKey = input('hostkey');

        if(!$hostKey){
            throw new CustomException('hostkey为必要参数', '202');
        }

        $server = new RuleService();
        $data = $server->send($hostKey);

        return $this->jsonOutPut($data);
    }

}